package com.flyco.dialog.widget.base;

import android.content.Context;
import android.view.MotionEvent;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.Animation.AnimationListener;
import android.widget.LinearLayout;
import com.flyco.animation.BaseAnimatorSet;

public abstract class BottomTopBaseDialog extends BaseDialog
{
  protected View animateView;
  protected int bottom;
  protected long innerAnimDuration = 350L;
  protected Animation innerDismissAnim;
  protected Animation innerShowAnim;
  protected boolean isInnerDismissAnim;
  protected boolean isInnerShowAnim;
  protected int left;
  protected int right;
  protected int top;
  private BaseAnimatorSet windowInAs;
  private BaseAnimatorSet windowOutAs;

  public BottomTopBaseDialog(Context paramContext)
  {
    super(paramContext);
  }

  protected void dismissWithAnim()
  {
    if (this.innerDismissAnim != null)
    {
      this.innerDismissAnim.setDuration(this.innerAnimDuration);
      this.innerDismissAnim.setAnimationListener(new Animation.AnimationListener()
      {
        public void onAnimationEnd(Animation paramAnonymousAnimation)
        {
          BottomTopBaseDialog.this.isInnerDismissAnim = false;
          BottomTopBaseDialog.this.superDismiss();
        }

        public void onAnimationRepeat(Animation paramAnonymousAnimation)
        {
        }

        public void onAnimationStart(Animation paramAnonymousAnimation)
        {
          BottomTopBaseDialog.this.isInnerDismissAnim = true;
        }
      });
      this.ll_control_height.startAnimation(this.innerDismissAnim);
    }
    while (true)
    {
      if (this.animateView != null)
      {
        if (getWindowOutAs() != null)
          this.windowOutAs = getWindowOutAs();
        this.windowOutAs.duration(this.innerAnimDuration).playOn(this.animateView);
      }
      return;
      superDismiss();
    }
  }

  public boolean dispatchTouchEvent(MotionEvent paramMotionEvent)
  {
    if ((this.isInnerDismissAnim) || (this.isInnerShowAnim))
      return true;
    return super.dispatchTouchEvent(paramMotionEvent);
  }

  protected abstract BaseAnimatorSet getWindowInAs();

  protected abstract BaseAnimatorSet getWindowOutAs();

  public void innerAnimDuration(long paramLong)
  {
    this.innerAnimDuration = paramLong;
  }

  public void onBackPressed()
  {
    if ((this.isInnerDismissAnim) || (this.isInnerShowAnim))
      return;
    super.onBackPressed();
  }

  public void padding(int paramInt1, int paramInt2, int paramInt3, int paramInt4)
  {
    this.left = paramInt1;
    this.top = paramInt2;
    this.right = paramInt3;
    this.bottom = paramInt4;
  }

  protected void showWithAnim()
  {
    if (this.innerShowAnim != null)
    {
      this.innerShowAnim.setDuration(this.innerAnimDuration);
      this.innerShowAnim.setAnimationListener(new Animation.AnimationListener()
      {
        public void onAnimationEnd(Animation paramAnonymousAnimation)
        {
          BottomTopBaseDialog.this.isInnerShowAnim = false;
        }

        public void onAnimationRepeat(Animation paramAnonymousAnimation)
        {
        }

        public void onAnimationStart(Animation paramAnonymousAnimation)
        {
          BottomTopBaseDialog.this.isInnerShowAnim = true;
        }
      });
      this.ll_control_height.startAnimation(this.innerShowAnim);
    }
    if (this.animateView != null)
    {
      if (getWindowInAs() != null)
        this.windowInAs = getWindowInAs();
      this.windowInAs.duration(this.innerAnimDuration).playOn(this.animateView);
    }
  }
}

/* Location:           C:\Users\user\Desktop\dd28_pcdd720\classes_dex2jar.jar
 * Qualified Name:     com.flyco.dialog.widget.base.BottomTopBaseDialog
 * JD-Core Version:    0.6.2
 */